/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package entidades;

import java.io.Serializable;
import java.math.BigInteger;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 *
 * @author cegarciaa
 */
@Entity
@Table(name = "bitacora")
@NamedQueries({
    @NamedQuery(name = "Bitacora.findAll", query = "SELECT b FROM Bitacora b"),
    @NamedQuery(name = "Bitacora.findByIdbitacora", query = "SELECT b FROM Bitacora b WHERE b.idbitacora = :idbitacora"),
    @NamedQuery(name = "Bitacora.findByIddispositivo", query = "SELECT b FROM Bitacora b WHERE b.iddispositivo = :iddispositivo"),
    @NamedQuery(name = "Bitacora.findByNombredispositivo", query = "SELECT b FROM Bitacora b WHERE b.nombredispositivo = :nombredispositivo"),
    @NamedQuery(name = "Bitacora.findByUbicacion", query = "SELECT b FROM Bitacora b WHERE b.ubicacion = :ubicacion"),
    @NamedQuery(name = "Bitacora.findByFecha", query = "SELECT b FROM Bitacora b WHERE b.fecha = :fecha"),
    @NamedQuery(name = "Bitacora.findByEvento", query = "SELECT b FROM Bitacora b WHERE b.evento = :evento"),
    @NamedQuery(name = "Bitacora.findByD5", query = "SELECT b FROM Bitacora b WHERE b.d5 = :d5"),
    @NamedQuery(name = "Bitacora.findByD4", query = "SELECT b FROM Bitacora b WHERE b.d4 = :d4")})
public class Bitacora implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "IDBITACORA")
    private Long idbitacora;
    @Column(name = "IDDISPOSITIVO")
    private BigInteger iddispositivo;
    @Column(name = "NOMBREDISPOSITIVO")
    private String nombredispositivo;
    @Column(name = "UBICACION")
    private String ubicacion;
    @Column(name = "FECHA")
    @Temporal(TemporalType.TIMESTAMP)
    private Date fecha;
    @Column(name = "EVENTO")
    private String evento;
    @Column(name = "D5")
    private String d5;
    @Column(name = "D4")
    private String d4;

    public Bitacora() {
    }

    public Bitacora(Long idbitacora) {
        this.idbitacora = idbitacora;
    }

    public Long getIdbitacora() {
        return idbitacora;
    }

    public void setIdbitacora(Long idbitacora) {
        this.idbitacora = idbitacora;
    }

    public BigInteger getIddispositivo() {
        return iddispositivo;
    }

    public void setIddispositivo(BigInteger iddispositivo) {
        this.iddispositivo = iddispositivo;
    }

    public String getNombredispositivo() {
        return nombredispositivo;
    }

    public void setNombredispositivo(String nombredispositivo) {
        this.nombredispositivo = nombredispositivo;
    }

    public String getUbicacion() {
        return ubicacion;
    }

    public void setUbicacion(String ubicacion) {
        this.ubicacion = ubicacion;
    }

    public Date getFecha() {
        return fecha;
    }

    public void setFecha(Date fecha) {
        this.fecha = fecha;
    }

    public String getEvento() {
        return evento;
    }

    public void setEvento(String evento) {
        this.evento = evento;
    }

    public String getD5() {
        return d5;
    }

    public void setD5(String d5) {
        this.d5 = d5;
    }

    public String getD4() {
        return d4;
    }

    public void setD4(String d4) {
        this.d4 = d4;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idbitacora != null ? idbitacora.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Bitacora)) {
            return false;
        }
        Bitacora other = (Bitacora) object;
        if ((this.idbitacora == null && other.idbitacora != null) || (this.idbitacora != null && !this.idbitacora.equals(other.idbitacora))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "entidades.Bitacora[idbitacora=" + idbitacora + "]";
    }

}
